package com.reger.web.config;

import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.reger.core.model.SysModel;

@ConfigurationProperties(WebProperties.prefix)
public class WebProperties implements SysModel{

	private static final long serialVersionUID = 1L;
	static final String prefix="spring.web-core";
	
	/**
	 * 跨域设置的参数
	 */
	private List<CorsProperties> cors;
	
	/**
	 * jsonP允许的请求参数名
	 */
	private String[] jsonpQueryParamNames=new String[]{"jsonpCallback"};

	/**
	 * 不需要进行权限校验得接口，支持后缀匹配和正则表达式匹配,exposedApiPath优先，默认所有接口都需要签名校验
	 */
	private List<String> allowedApiPath;
	
	/**
	 * 需要进行权限校验得接口，支持后缀匹配和正则表达式匹配,必须要进行校验的
	 */
	private List<String> exposedApiPath;
	
	public List<String> getAllowedApiPath() {
		return allowedApiPath;
	}

	public void setAllowedApiPath(List<String> allowedApiPath) {
		this.allowedApiPath = allowedApiPath;
	}

	public List<String> getExposedApiPath() {
		return exposedApiPath;
	}

	public void setExposedApiPath(List<String> exposedApiPath) {
		this.exposedApiPath = exposedApiPath;
	}

	public List<CorsProperties> getCors() {
		return cors;
	}

	public void setCors(List<CorsProperties> cors) {
		this.cors = cors;
	}
	
	public String[] getJsonpQueryParamNames() {
		return jsonpQueryParamNames;
	}

	public void setJsonpQueryParamNames(String[] jsonpQueryParamNames) {
		this.jsonpQueryParamNames = jsonpQueryParamNames;
	}


}
